package com.ysstech.finance.mapper;

import java.time.LocalDate;
import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ysstech.finance.entity.Balance;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author lishuangliang
 * @since 2021-04-01
 */
@Component
public interface BalanceMapper extends BaseMapper<Balance> {
    /**
     * 查询科目表信息
     *
     * @param wrapper
     * @return
     */
    IPage<Balance> queryBalance(IPage<Balance> page, @Param(Constants.WRAPPER) QueryWrapper<Balance> wrapper);

    /**
     * 查询昨天的明细科目余额表记录
     *
     * @param wrapper
     * @return
     */
    List<Balance> queryBalanceYesterday(@Param(Constants.WRAPPER) QueryWrapper<Balance> wrapper);

    /**
     * 查询明细的余额表数据，给估值表统计使用
     *
     * @param balance
     * @return
     */
    List<Balance> queryBalanceByValuation(Balance balance);
}
